#include <stdio.h>
int main()
{
    int hex, dec, rob;
    scanf("%d", &dec);
    rob = dec % 16;
    dec = (dec - rob) / 16;
    hex = dec * 10 + rob;
    printf("%d", hex);
    return 0;
}
//其实直接printf("%x",hex);即可